
package protocol.transactions;

import protocol.XoneProtocol;
import protocol.XoneServiceCode;

import com.netease.http.THttpRequest;

public class CancelFollowTransaction extends XoneBaseTransaction {

    private String mUserId;

    public CancelFollowTransaction(String userId) {
        super(TRANSACTION_TYPE_CANCEL_FOLLOW);
        mUserId = userId;
    }

    @Override
    public void onTransact() {
        THttpRequest request = XoneProtocol.getInstance().createCancelFollowRequest(mUserId);
        sendRequest(request);
    }

    @Override
    protected void onXoneTransactionSuccess(int code, Object obj) {
        notifyMessage(XoneServiceCode.TRANSACTION_SUCCESS, mUserId);
    }

}
